Do not build gpsbabel.pdf on mips as fop is broken there.
authorBernd Zeimetz <bernd@bzed.de>
Wed, 5 May 2010 22:29:04 +0000 (00:29 +0200)
committerBernd Zeimetz <bernd@bzed.de>
Wed, 5 May 2010 22:55:50 +0000 (00:55 +0200)
debian/control
debian/gpsbabel.doc-base [deleted file]
debian/gpsbabel.doc-base.common [new file with mode: 0644]
debian/gpsbabel.doc-base.pdf [new file with mode: 0644]
debian/gpsbabel.docs
debian/rules

index c46458acbfcf4e7f66de606117cab1a7bed92780..efc910f4a356dec4aad7ea5755c6610ae1b8a3e0 100644 (file)
@@ -5,7 +5,7 @@ Maintainer: Bernd Zeimetz <bzed@debian.org>
 Build-Depends: debhelper (>= 7.0.0), quilt,
  autotools-dev, autoconf,
  libexpat1-dev, expat, help2man,
- fop,
+ fop [!mips],
  xsltproc, docbook-xml, docbook-xsl, libxml2-utils,
  libusb-dev, zlib1g-dev, libpaper-dev, libqt4-dev
 Standards-Version: 3.8.4
diff --git a/debian/gpsbabel.doc-base b/debian/gpsbabel.doc-base
deleted file mode 100644 (file)
index f3bc6f4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Document: gpsbabel
-Title: gpsbabel filter and format documentation
-Section: Science/Geoscience
-
-Format: PDF
-Files: /usr/share/doc/gpsbabel/gpsbabel.pdf.gz
-
-Format: HTML
-Index: /usr/share/doc/gpsbabel/htmldoc/index.html
-Files: /usr/share/doc/gpsbabel/htmldoc/*.html
diff --git a/debian/gpsbabel.doc-base.common b/debian/gpsbabel.doc-base.common
new file mode 100644 (file)
index 0000000..9a5224a
--- /dev/null
@@ -0,0 +1,8 @@
+Document: gpsbabel
+Title: gpsbabel filter and format documentation
+Section: Science/Geoscience
+
+Format: HTML
+Index: /usr/share/doc/gpsbabel/htmldoc/index.html
+Files: /usr/share/doc/gpsbabel/htmldoc/*.html
+
diff --git a/debian/gpsbabel.doc-base.pdf b/debian/gpsbabel.doc-base.pdf
new file mode 100644 (file)
index 0000000..c2544cd
--- /dev/null
@@ -0,0 +1,3 @@
+Format: PDF
+Files: /usr/share/doc/gpsbabel/gpsbabel.pdf.gz
+
index a1bdee4b59ecb2517c51a2aa733c6bfda48f4d04..e2de8ee8e72668190de5641ea008c505c0ca42a9 100644 (file)
@@ -1,4 +1,3 @@
 README.*
 debian/doctmp/*
 AUTHORS
-gpsbabel.pdf
index 056816abad0561f1edd568abd6aaf1469898a417..ae095a787dd4eedb8644e8c0481fb1c6556db909 100755 (executable)
@@ -5,7 +5,9 @@
 
 PKG_GPSBABEL=gpsbabel
 PKG_GPSBABEL_GUI=gpsbabel-gui
+DOCTEMP = debian/doctmp
 VERSION := $(shell dpkg-parsechangelog | awk '/^Version/ {print $$2}')
+HOSTARCH := $(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU))
 
 #we use quilt to handle our patches
 include /usr/share/quilt/quilt.make
@@ -21,7 +23,7 @@ endif
 
 # Extended precision on i386 results in weird bugs, so we build
 # with -ffloat-store.
-ifeq (i386,$(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)))
+ifeq (i386,$(HOSTARCH))
 CFLAGS += -ffloat-store
 endif
 
@@ -32,13 +34,13 @@ CONFENV = LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
 configure: configure-stamp gui/Makefile
 configure-stamp: $(QUILT_STAMPFN)
        dh_testdir
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ifneq (,$(wildcard /usr/share/misc/config.sub))
        cp -f /usr/share/misc/config.sub config.sub
 endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ifneq (,$(wildcard /usr/share/misc/config.guess))
        cp -f /usr/share/misc/config.guess config.guess
 endif
-       $(CONFENV) ./configure --with-zlib=system --with-doc=debian/doctmp \
+       $(CONFENV) ./configure --with-zlib=system --with-doc=$(DOCTEMP) \
                --prefix=/usr
 
        touch $@
@@ -73,7 +75,14 @@ build-stamp: configure-stamp
        touch $@
 
 build-doc-stamp: configure-stamp
-       $(MAKE) doc
+       $(MAKE) $(DOCTEMP)/htmldoc-devel/index.html WEB=$(DOCTEMP) DOCVERSION=devel
+       cp $(CURDIR)/debian/gpsbabel.doc-base.common $(CURDIR)/debian/gpsbabel.doc-base
+ifneq (mips,$(HOSTARCH))
+       $(MAKE) gpsbabel.pdf WEB=$(DOCTEMP) DOCVERSION=devel
+       rm -f $(CURDIR)/$(DOCTEMP)/htmldoc-devel/gpsbabel-$(DOCVERSION).pdf DOCVERSION=devel
+       cp gpsbabel.pdf $(CURDIR)/$(DOCTEMP)
+       cat $(CURDIR)/debian/gpsbabel.doc-base.pdf >> $(CURDIR)/debian/gpsbabel.doc-base
+endif
        touch $@
 
 build-gui: build-gui-stamp
@@ -106,6 +115,7 @@ clean-patched:
                xmldoc/filters/options/track-trk2seg.xml \
                xmldoc/filters/options/track-seg2trk.xml
        rm -f gbversion.h
+       rm -f $(CURDIR)/debian/gpsbabel.doc-base
        dh_clean 
 
 install: $(BUILD_TARGETS)
@@ -117,9 +127,8 @@ install: $(BUILD_TARGETS)
        # Add here commands to install the package into debian/gpsbabel.
        $(MAKE) install DESTDIR=$(CURDIR)/debian/gpsbabel
 
-       # Rename htmldoc dir and remove pdf file
+       # Rename htmldoc dir
        mv `ls -d $(CURDIR)/debian/doctmp/htmldoc-*` $(CURDIR)/debian/doctmp/htmldoc
-       rm -f $(CURDIR)/debian/doctmp/htmldoc/*.pdf
 
        dh_install